﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
<script>
	function displayDate() {
		document.getElementById("demo").innerHTML=Date();
		//alert(document.getElementById("bt1").value);
		//console.log(document.getElementById("bt1").innerHTML);
		//console.warn(1011);
		//console.error("something wrong");
	}

	//var a1 = setInterval(displayDate, 1000);
	document.onclick=function() {
		
		//clearInterval(a1);
		alert("clearInterval");
	}
//	window.setInterval(hello,5000); 
//  document.getElementById("demo").innerHTML="段落已修改。";
</script>
</head>
<body>

<h1>我的第一个 JavaScript 程序</h1>
<p id="demo">这是一个段落</p>
<script src="myScript.js"></script>
<button id="bt1" type="button" onclick="shout()">显示日期</button>
<button id="bt2" type="button" onclick="hideDate() style="display:none;">隐藏日期</button>
</body>
</html>